class Women:

    def __init__(self, name):
        self.name = name
        self.__age = 28  # 私有属性

    def set_age(self, age):
        print("set_age()..被执行了。。")
        self.__age = age

    def get_age(self):
        print("get_age()...被执行了。。。")
        return self.__age

    # property 两个参数,函数 get,set
    # age = property(fset=set_age, fget=get_age)
    age = property(get_age, set_age)


w = Women('rose')

# print(w.get_age())
# w.set_age(11)
# print(w.get_age())
print()
w.age = 99
# w.age
print(w.age)
